package com.jf3q.front.controller;

import com.jf3q.common.domain.EduMember;
import com.jf3q.common.vo.ResultVo;
import com.jf3q.front.service.MemberService;
import com.jf3q.front.vo.UcenterMemberVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Tag(name = "会员管理")
@RequestMapping("/ucenterMember")
public class UcenterMemberController {
    @Autowired
    private MemberService memberService;
    @Operation(summary = "根据用户id查询用户信息")
    @PostMapping("/getMemberInfoById/{memberId}")
    public ResultVo comment(@PathVariable String memberId){
        EduMember edumember = memberService.getById(memberId);
        UcenterMemberVo memberVo=new UcenterMemberVo();
        BeanUtils.copyProperties(edumember,memberVo);
        return ResultVo.success("",memberVo);
    }
}
